#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,c,d,e,s,v;
    scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
    s=(a*c+d*(a-2*e)*2+(c-2*e)*d*2)*2+(a*b+(a-2*e)*d*2+(b-2*e)*d*2)*2+(b*c+(b-2*e)*d*2+(c-2*e)*d*2)*2;
    v=a*c*b-(c-2*e)*(a-2*e)*d*2-(b-2*e)*(c-2*e)*d*2-(a-2*e)*(b-2*e)*d*2;
    printf("%d %d\n",s,v);
    return 0;
}
